//
//  ViewController.swift
//  DemoNSActivity
//
//  Created by 唐可雄 on 17/1/14.
//  Copyright © 2017年 swustyc. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        
        let activity: NSUserActivity = NSUserActivity(activityType: Bundle.main.bundleIdentifier! + "test")
        activity.title = "test"
        activity.userInfo = ["id":"http://www.baidu.com"]
        activity.isEligibleForSearch = true
        self.userActivity = activity
        activity.becomeCurrent()
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

}

